
<html><HEAD>
<LINK REL=STYLESHEET HREF="default.css" TYPE="text/css">
<TITLE>
Preparing to use the database with DirectConnect</TITLE>
</HEAD>
<BODY>

<!-- Header -->
<p class="ancestor" align="right"><A HREF="connpbp77.htm">Previous</A>&nbsp;&nbsp;<A HREF="connpbp79.htm" >Next</A>
<!-- End Header -->
<A NAME="CIHJHACF"></A><h1>Preparing to use the database with DirectConnect</h1>
<A NAME="TI1586"></A><p>Before you define the interface and connect to a database
through the DirectConnect interface, follow these steps to prepare
the database for use: <A NAME="TI1587"></A>
<ol>
</li>
<li class=ds>Install and configure the Sybase
middleware data access products, network, and client software.</li>
<li class=ds>Install the DirectConnect interface.</li>
<li class=ds>Verify that you can connect to your middleware product
and your database outside PowerBuilder.</li>
<li class=ds>Create the extended attribute system tables outside PowerBuilder. 
</li>
</ol>
</p>
<A NAME="TI1588"></A><h4>Step 1: Install and configure the Sybase middleware
product</h4>
<A NAME="TI1589"></A><p>You must install and configure the Sybase middleware data
access product, network, and client software. </p>
<A NAME="TI1590"></A><p><img src="images/proc.gif" width=17 height=17 border=0 align="bottom" alt="Steps"> To install and configure the Sybase middleware
data access product, network, and client software:</p>
<ol><li class=fi><p>Make sure the appropriate database software
is installed and running on its server.</p><p>You must obtain the database server software from your database
vendor.</p><p>For installation instructions, see your database
vendor's documentation.</p></li>
<li class=ds><p>Make sure the appropriate DirectConnect access
service software is installed and running on the DirectConnect server
specified in your database profile </p><p><i>or</i></p><p>Make sure the appropriate Open ServerConnect software
is installed and running on the mainframe specified in your database
profile.</p></li>
<li class=ds><p>Make sure the required network software (such
as TCP/IP) is installed and running on your computer and
is properly configured so you that can connect to the DirectConnect
server or mainframe at your site.</p><p>You must install the network communication driver that supports
the network protocol and operating system platform you are using. </p><p>For installation and configuration instructions,
see your network or database administrator.</p></li>
<li class=ds><p>Install the required Open Client CT-Library (CT-Lib)
software on each client computer on which PowerBuilder is installed.</p><p>You must obtain the Open Client software from Sybase. Make
sure the version of Open Client you install supports <i>both</i> of
the following:<A NAME="TI1591"></A>
<ul>
<li class=fi>The operating
system running on the client computer</li>
<li class=ds>The version of PowerBuilder that you are running
</li>
</ul>
</p><p><img src="images/note.gif" width=17 height=17 border=0 align="bottom" alt="Note"> <span class=shaded>Open Client required </span> <A NAME="TI1592"></A>To use the DirectConnect interface, you must install Open
Client.</p>
<p>For information about Open Client, see your
Open Client documentation.</p></li>
<li class=ds><p>Make sure the Open Client software is properly
configured so you can connect to the middleware data access product
at your site.</p><p>Installing the Open Client software places the <i>SQL.INI</i> configuration
file in the <ACRONYM title = "sequel" >SQL</ACRONYM> Server directory
on your computer. <i>SQL.INI</i> provides information
that <ACRONYM title = "sequel" >SQL</ACRONYM> Server uses to find
and connect to the middleware product at your site. You can enter
and modify information in <i>SQL.INI</i> with the
configuration utility or editor that comes with the Open Client software.</p><p>For information about editing the <i>SQL.INI</i> file,
see <A HREF="connpbp78.htm#BABHDBEH">"Editing the <ACRONYM title = "sequel dot i n i" >SQL.INI </ACRONYM>file"</A>.
For more information about setting up <i>SQL.INI</i> or
any other required configuration file, see your <ACRONYM title = "sequel" >SQL</ACRONYM> Server documentation.</p></li>
<li class=ds><p>If required by your operating system, make sure
the directory containing the Open Client software is in your system
path.</p></li>
<li class=ds><p>Make sure only one copy of each of the following
files is installed on your client computer:<A NAME="TI1593"></A>
<ul>
<li class=fi>DirectConnect interface DLL</li>
<li class=ds>Network communication DLL (such as <i>NLWNSCK.DLL</i> for
Windows Sockets-compliant TCP/IP)</li>
<li class=ds>Open Client DLLs (such as <i>LIBCT.DLL</i> and <i>LIBCS.DLL</i>)
</li>
</ul>

                      </p></li></ol>
<br><A NAME="TI1594"></A><h4>Step 2: Install the interface</h4>
<A NAME="TI1595"></A><p>In the PowerBuilder Setup program, select the Typical install,
or select the Custom install and select the Direct Connect Interface
(DIR). </p>
<A NAME="TI1596"></A><h4>Step 3: Verify the connection</h4>
<A NAME="TI1597"></A><p>Make sure you can connect to your middleware product and your
database and log in to the database you want to access from outside PowerBuilder.</p>
<A NAME="TI1598"></A><p>Some possible ways to verify the connection are by running
the following tools:<A NAME="TI1599"></A>
<ul>
<li class=fi><b>Accessing the database server</b>   Tools such as the Open Client/Open Server Configuration
utility (or any Ping utility) check whether you can reach the database
server from your computer.</li>
<li class=ds><b>Accessing the database</b>   Tools such as <ACRONYM title = "I sequel" >ISQL</ACRONYM> or <ACRONYM title = "sequel" >SQL</ACRONYM> Advantage (interactive <ACRONYM title = "sequel" >SQL</ACRONYM> utilities) check whether you
can log in to the database and perform database operations. It is
a good idea to specify the same connection parameters you plan to
use in your PowerBuilder database profile to access the database.
</li>
</ul>
</p>
<A NAME="TI1600"></A><h4>Step 4: Create the extended attribute system
tables</h4>
<A NAME="TI1601"></A><p>PowerBuilder uses a collection of five system tables to store
extended attribute information. When using the DirectConnect interface,
you <i>must</i> create the extended attribute system
tables outside PowerBuilder to control the access rights and location
of these tables. </p>
<A NAME="TI1602"></A><p>Run the <i>DB2SYSPB.SQL</i> script outside PowerBuilder using
the <ACRONYM title = "sequel" >SQL</ACRONYM> tool of your choice.</p>
<A NAME="TI1603"></A><p>For instructions, see <A HREF="connpbp80.htm#CCJDFDBI">"Creating the extended attribute
system tables in DB2 databases"</A>. </p>
<A NAME="BABHDBEH"></A><h4>Editing the <ACRONYM title = "sequel dot i n i" >SQL.INI </ACRONYM>file</h4>
<A NAME="TI1604"></A><p>Make sure the <i>SQL.INI</i> file provides an
entry about either the access service being used and the DirectConnect
server on which it resides or the Open ServerConnect program being
used and the mainframe on which it resides. </p>
<A NAME="TI1605"></A><p>For the server object name, you need to provide the exact
access service name as it is defined in the access service library
configuration file on the DirectConnect server. You must also specify
the network communication DLL being used, the TCP/IP address
or alias used for the DirectConnect server on which the access service
resides, and the port on which the DirectConnect server listens
for requests: <p><PRE> [<i>access_service_name</i>]</PRE><PRE> query=<i>network_dll</i>,<i>server_alias,server_port_no</i></PRE></p>
<A NAME="TI1606"></A><p>PowerBuilder users must also specify the access service name
in the <ACRONYM title = "sequel C A" >SQLCA</ACRONYM>.ServerName
property of the Transaction object. </p>

